package com.zhiyou.app.shop.website.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.zhiyou.app.shop.common.BaseAction;
import com.zhiyou.app.shop.common.util.ShopConstants;
import com.zhiyou.app.shop.website.dao.pojo.DicItem;
import com.zhiyou.app.shop.website.dao.pojo.Msg;
import com.zhiyou.app.shop.website.service.IDicItemService;
import com.zhiyou.app.shop.website.service.IMsgService;

public class MsgAction extends BaseAction{

	private static final long serialVersionUID = 1L;

	@Autowired
	private IMsgService msgService;
	@Autowired
	private IDicItemService dicItemService;
	
	private Msg msg;
	private List<DicItem> msgTypes;
	
	public String tomail(){
		msgTypes = dicItemService.findByType(ShopConstants.MAIL_TYPE);
		return SUCCESS;
	}
	
	public String send(){
		
		return SUCCESS;
	}


	public List<DicItem> getMsgTypes() {
		return msgTypes;
	}

	public void setMsgTypes(List<DicItem> msgTypes) {
		this.msgTypes = msgTypes;
	}	
	
	public Msg getMsg() {
		return msg;
	}
	
	public void setMsg(Msg msg) {
		this.msg = msg;
	}
}
